const express = require('express');

const app = express();

app.get('/request',(req,res,next)=>{ //next方法，就是是否允许请求走到下一个中间件
    req.name = '张三';
    next();
});
app.get('/request',(req,res)=>{
    res.send(req.name);
})

app.listen(3000);
console.log('启动成功');